# -*- coding: utf-8 -*-
# @Time : 2025/2/27 15:59
# @Author : debbyszhang
# @File : new_user.py
# @desc :
import allure
from playwright.sync_api import expect

from libs.tools import utils
from pageObject.user_list_page import UserListPage


@allure.feature("创建用户")
class TestNewUser:

    def test_new_user(self, page):
        user_list_page = UserListPage(page)
        username, password = 'user' + utils.getCurrentMintus(), 'abcd1234'
        user_list_page.new_user(username, password)
        expect(page.get_by_role("cell", name=username).locator("div")).to_be_visible()
